package com.stylefeng.guns.modular.pay.exception;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/**
 * 业务异常
 * @author Administrator
 *
 */
@JsonIgnoreProperties({"key"})
@SuppressWarnings("serial")
public class BusException extends RuntimeException {

	private String retCode;
	private String errMsg;
	private String key;
	
	
	public BusException(String message) {
		super(message);
	}
	
	public BusException(ResultEnum res) {
		this.retCode = res.getCode();
		this.errMsg = res.getMsg();
	}
	
	public BusException(ResultEnum res,String key) {
		this.retCode = res.getCode();
		this.errMsg = res.getMsg();
		this.key = key;
	}
	
	public BusException(ResultEnum res,String msg,String key) {
		this.retCode = res.getCode();
		this.errMsg = msg;
		this.key = key;
	}
	
	public BusException(String retCode,String errMsg) {
		this.retCode = retCode;
		this.errMsg = errMsg;
		
	}
	
	public BusException(String retCode,String errMsg,String key) {
		this.retCode = retCode;
		this.errMsg = errMsg;
		this.key = key;
	}

	public String getRetCode() {
		return retCode;
	}

	public void setRetCode(String retCode) {
		this.retCode = retCode;
	}

	public String getErrMsg() {
		return errMsg;
	}

	public void setErrMsg(String errMsg) {
		this.errMsg = errMsg;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}
	
	

}
